package com.shop.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.shop.dao.OrderDao;
import com.shop.entity.Order;
import com.shop.entity.User;
import com.shop.service.OrderService;
@Service
@Transactional
public class OrderServiceImpl implements OrderService{
	
	@Autowired
	private OrderDao orderDao ;
	@Override
	public List<Order> selectOrderByStatus(Order order) {
		return orderDao.selectOrderByStatus(order);
	}

	@Override
	public List<Order> findAllOrder() {
		return orderDao.findAllOrder();
	}

	@Override
	public Serializable addOrder(Order order) {
		return orderDao.addOrder(order);
	}

	@Override
	public Serializable deleteOrder(Order order) {
		return orderDao.deleteOrder(order);
	}

	@Override
	public Serializable updateOrder(Order order) {
		return orderDao.updateOrder(order);
	}

	@Override
	public Order selectByOrderId(Order order) {
		return orderDao.selectByOrderId(order);
	}

	@Override
	public List<Order> selectOrderByUserId(User user) {
		return orderDao.selectOrderByUserId(user);
	}

	public OrderDao getOrderDao() {
		return orderDao;
	}

	public void setOrderDao(OrderDao orderDao) {
		this.orderDao = orderDao;
	}
	
	
	
	

}
